import Vue from 'vue'
import App from './App'
import store from './store'
import Storage from './utils/storage'
import uView from "@/components/uview-ui"
//请求加载组件
import loadingView from './components/loading-view/loading-view.vue';
import {
	toast
} from './utils/tools'
import minxinsApp from '@/mixins/app'

Vue.prototype.$toast = toast
Vue.prototype.$Storage = Storage
Vue.config.productionTip = false

Vue.use(uView)
App.mpType = 'app'

//组件挂载到全局，方便每个页面使用
Vue.component('loading-view', loadingView);
 
//挂载全局显示/隐藏请求加载动画
function showLoading(){
	store.commit('request_show_loading');
}
function hideLoading(){
	store.commit('request_hide_loading');
}
Vue.prototype.$showLoading = showLoading;
Vue.prototype.$hideLoading = hideLoading;

const app = new Vue({
	...App,
	store
})
app.$mount()
